package com.zatech.cgnci.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zatech.cgnci.project.entity.CgnciMessageReceiverDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CgnciMessageReceiverMapper extends BaseMapper<CgnciMessageReceiverDO> {

    /**
     * 更新消息已读状态
     */
    void updateReadStatus(@Param("messageId") Long messageId, @Param("receiver") String receiver);

    /**
     * 批量更新消息已读状态
     */
    void batchUpdateReadStatus(@Param("messageIds") List<Long> messageIds, @Param("receiver") String receiver);

    /**
     * 删除接收人的所有消息
     */
    void deleteByReceiver(@Param("receiver") String receiver);
} 